import React from "react"
import ReactDOM from "react-dom"
import MediaQuery from 'react-responsive';

// 引入antd css
import "antd/dist/antd.css"
import 'antd-mobile/dist/antd-mobile.css'; 

import MobileIndex from "./mobile/mobile_index"
import PCIndex from "./pc/pc_index"
import Login from "./mobile/mobile_login"
import { HashRouter,Route ,Switch } from 'react-router-dom'

class App extends React.Component{
	render(){
		return(
			<div>
				<MediaQuery query="(min-device-width: 1224px)">
					<PCIndex/>
				</MediaQuery>
				<MediaQuery query="(max-device-width: 1224px)">
					<HashRouter>
						<Switch>
							<Route exact path="/" component={Login} />
							<Route path="/mobile" component={MobileIndex} />
						</Switch>
					</HashRouter>
				</MediaQuery>
			</div>
		)
	}
}

ReactDOM.render(
	<App/>,
	document.getElementById("root")
);